﻿//下载超链接
function DownLoadOpen(s) {
    var id = $(s).attr("dataValue");
    window.location.href = "../DownLoadPage.aspx?id=" + id;
    return false;
}
//导出
function Export() {
    eval(hcExport.getValue());
    return false;
};
//验证
function Validate() {
    var result = false;
    if (bValidator != undefined && $.isFunction(bValidator.validate)) {
        result = bValidator.validate(); //先进行可能的验证
        if (result == false) {
            EnableButton(); //验证失败，清空计数器，等待下一次验证
        }
        else {
            result = DisableButton(); //验证成功，根据计数器判断是否回发
        }
    }
    else {
        result = DisableButton(); //无验证，直接根据计数器判断是否回发
    }
    return result;
}
function CheckSelectValues() {
    if (PopUpValueText.getValue().length == 0) {
        alert("请选择要删除的数据");
        return false;
    }
    if (!confirm('是否删除该记录？')) {
        return false;
    }
    return true;
}
function EnableButton() {
    x = 0;
}

function DisableButton() {
    return ++x == 1;
}

var x = 0; 